package com.ay7.exception;

import com.ay7.enums.ResultEnum;
import lombok.Getter;

/**
 * 异常类
 * Created by wenjul
 * on 18/3/26 0026 20:33
 */
@Getter
public class SellException extends RuntimeException{

    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code=resultEnum.getCode();
    }

    public SellException(Integer code,String message) {
        super(message);
        this.code = code;
    }
}
